<?php

/**
 * Project: CrazyPoems
 * Author: Alexandru
 * Date: 09/09/2009
 * File: export_users.php
 */

// Load default settings.
require('inc/config.php');
require('inc/functions.misc.php');
require('inc/functions.index.php');

// Admin only.
if (intval($cookie->admin) == 0)
	die('admin only');

// Get parameters

$users = getAllMembers();

header('Content-Type: text/plain');
echo '"name","email","alias","homeAddress","workAddress","homePhone","workPhone","cellPhone","fax","title","company","notes","pgpPublicKey","smimePublicKey","freebusyUrl"'."\n";
foreach ($users as $user) {
	echo '"'.$user['username'].'","'.$user['email'].'",,,,,,,,,,,,,'."\n";
}

// End page.
require('inc/end.php');
?>
